package com.vc.videosdk.xlog

import com.elvishew.xlog.printer.file.naming.FileNameGenerator
import java.text.SimpleDateFormat
import java.util.Date

/**

 * @Author : wy

 * @Time : On 2024/8/27 15:45

 * @Description : MyFileNameGenerator 自定义日志命令格式

 */
class MyFileNameGenerator : FileNameGenerator {
    override fun isFileNameChangeable(): Boolean {
        return true
    }

    override fun generateFileName(logLevel: Int, timestamp: Long): String {

        val sdf = SimpleDateFormat("yyyy-MM-dd")//yyyy-MM-dd HH:mm:ss
//        return LogLevel.getLevelName(logLevel) + "-" + "GifLog" + "-" + sdf.format(Date(timestamp)) + ".log"
        return "VcVideoLog" + "-" + sdf.format(Date(timestamp)) + ".log"
    }
}